using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class SOBITICHModel : ObjModel<SOBITICH>, IModelConverter
	{

		#region Constructor

		public SOBITICHModel()
			: base()
		{
		}

		public SOBITICHModel(SOBITICH obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid _masobitich;

		private System.Int32? _mabitich;

		private System.Guid? _nguoidodauid;

		private System.Guid? _malinhmuc;

		private System.Guid? _magiaodan;

		private System.Guid? _malopgiaoly;

		private System.String _diadiem;

		private System.String _tenlinhmuc;

		private System.String _tennguoidodau;

		private System.Int32? _ngaynhan;

		private System.Int32? _thangnhan;

		private System.Int32? _namnhan;

		private System.String _ghichu;

		private System.Int32? _maso;

		private System.Boolean? _luuso;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid MASOBITICH
		{
			get
			{
				return _masobitich;
			}
			set
			{
				_masobitich = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? MABITICH
		{
			get
			{
				return _mabitich;
			}
			set
			{
				_mabitich = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? NGUOIDODAUID
		{
			get
			{
				return _nguoidodauid;
			}
			set
			{
				_nguoidodauid = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MALINHMUC
		{
			get
			{
				return _malinhmuc;
			}
			set
			{
				_malinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN
		{
			get
			{
				return _magiaodan;
			}
			set
			{
				_magiaodan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MALOPGIAOLY
		{
			get
			{
				return _malopgiaoly;
			}
			set
			{
				_malopgiaoly = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIADIEM
		{
			get
			{
				return _diadiem;
			}
			set
			{
				_diadiem = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENLINHMUC
		{
			get
			{
				return _tenlinhmuc;
			}
			set
			{
				_tenlinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENNGUOIDODAU
		{
			get
			{
				return _tennguoidodau;
			}
			set
			{
				_tennguoidodau = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NGAYNHAN
		{
			get
			{
				return _ngaynhan;
			}
			set
			{
				_ngaynhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? THANGNHAN
		{
			get
			{
				return _thangnhan;
			}
			set
			{
				_thangnhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NAMNHAN
		{
			get
			{
				return _namnhan;
			}
			set
			{
				_namnhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(2000, ErrorMessage= "Value must be under 2000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String GHICHU
		{
			get
			{
				return _ghichu;
			}
			set
			{
				_ghichu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? MASO
		{
			get
			{
				return _maso;
			}
			set
			{
				_maso = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Boolean? LUUSO
		{
			get
			{
				return _luuso;
			}
			set
			{
				_luuso = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(SOBITICHModel);
		}

		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<SOBITICH>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override SOBITICH ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator SOBITICHModel(SOBITICH obj)
		{
			return new SOBITICHModel(obj);
		}
		public static implicit operator SOBITICH(SOBITICHModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
